package com.small.nacos.config.server.configuration;

import com.small.nacos.sys.utils.PropertyUtil;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 * 判断是否使用外部存储
 */
public class ConditionOnExternalStorage implements Condition {
    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        return !PropertyUtil.isEmbeddedStorage();
    }

}
